data {
  int<lower=0> N;
  int<lower=0,upper=1> majclash[N];
  vector[N] highgrav;
  vector[N] territory;
  vector[N] jointpol7;
  vector[N] rivalry_th;
  vector[N] absidealdiff;
  vector[N] atopally;
}
parameters {
  vector[7] beta;
}
model {

  for (k in 1:7)
        beta[k] ~ normal(0, 10);

  majclash ~ bernoulli_logit(beta[1] 
                             + beta[2] * highgrav
                             + beta[3] * territory
                             + beta[4] * jointpol7
                             + beta[5] * rivalry_th
                             + beta[6] * absidealdiff
                             + beta[7] * atopally);
}
generated quantities {
  vector[N] pred;
  for (i in 1:N)
    pred[i] = inv_logit(beta[1]
                             + beta[2] * highgrav[i]
                             + beta[3] * territory[i]
                             + beta[4] * jointpol7[i]
                             + beta[5] * rivalry_th[i]
                             + beta[6] * absidealdiff[i]
                             + beta[7] * atopally[i]);
}